package org.polyforms.repository.mock;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@Entity
@NamedQueries( {
        @NamedQuery(name = "MockEntity.ByName", query = "select m from MockEntity m where name = ?1"),
        @NamedQuery(name = "MockEntity.ByCodeAndName", query = "select m from MockEntity m where name = :name and code = :code"),
        @NamedQuery(name = "MockEntity.updateNameByCode", query = "update MockEntity set name = :name where code = :code"),
        @NamedQuery(name = "org.polyforms.repository.mock.MockEntity.ByCode", query = "delete From MockEntity where code = :code"),
        @NamedQuery(name = "org.polyforms.repository.mock.MockEntity.annotatedExecutor", query = "select m from MockEntity m where name = ?1") })
public class MockEntity {
    @Id
    private Long id;
    private String code;
    private String name;

    protected MockEntity() {
    }

    public MockEntity(final Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(final String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(final String name) {
        this.name = name;
    }
}
